package com.chenl.provider.util;


import java.util.Map;
public class TtlThreadLocal  {
    private static final ThreadLocal<Map<String, String>> MDC_THREAD_LOCAL = new InheritableThreadLocal<>();
    /**
     * 设置当前线程中的MDC
     * @param mdc
     */
    public static void set(Map<String, String> mdc){
        MDC_THREAD_LOCAL.set(mdc);
    }
    /**
     * 获取当前线程中的MDC
     * @return
     */
    public static Map<String, String> get(){
        return MDC_THREAD_LOCAL.get();
    }
}
